#include "FunctionDescription.h"

#include "TypeDescription.h"

SFunctionID CFunctionDescription::GetFunctionID() const
{
    SFunctionID ID;
    
    std::shared_ptr<CTypeDescription> Class=ParentClass.lock();
    if(Class->RawClassTypeID.HasValue())
    {
        ID.TypeID = Class->RawClassTypeID.GetValue();
    }
    else
    {
        ID.TypeID = Class->TypeID;
    }

    ID.FuncitonIndex = FunctionIndex;
    return ID;
}

bool CFunctionDescription::IsStatic() const
{
    return bIsStatic;
}

void CFunctionDescription::SetStatic(bool bInIsStatic)
{
    bIsStatic = bInIsStatic;
}

bool CFunctionDescription::IsVirtual() const
{
    return bIsVirtual;
}

void CFunctionDescription::SetVirtual(bool bInIsVirtual)
{
    bIsVirtual = bInIsVirtual;
}

bool CFunctionDescription::IsOverride() const
{
    return bIsOverride;
}

void CFunctionDescription::SetOverride(bool bInIsOverride)
{
    bIsOverride = bInIsOverride;
}

bool CFunctionDescription::IsNew() const
{
    return bIsNew;
}

void CFunctionDescription::SetNew(bool bInIsNew)
{
    bIsNew = bInIsNew;
}
